package com.service.impl;

import com.dao.UsersMapper;
import com.entity.Users;
import com.service.UsersService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;

@Service
public class UsersServiceImpl implements UsersService {

    @Resource
    private UsersMapper usersMapper;
    @Override
    public boolean reg(Users user) throws Exception {
        try {
            usersMapper.reg(user);
            return true;
        } catch (Exception ex) {
            ex.printStackTrace();
            return false;
        }
    }
    @Override
    public Users login(String username, String password) {
        return usersMapper.login(username, password);
    }
}
